﻿<UserControl x:Class="SilverlightPersianDatePickerUsage.TestView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:SilverlightPersianDatePickerUsage.ViewModel"
    xmlns:dp="clr-namespace:SilverlightPersianDatePicker.Views;assembly=Silverlight5PersianDatePicker" 
    mc:Ignorable="d" FlowDirection="RightToLeft" FontFamily="Tahoma" FontSize="11"
    d:DesignHeight="300" d:DesignWidth="400">    
    <UserControl.Resources>
        <vm:TestViewViewModel x:Key="vmTestViewViewModel" />
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" 
          DataContext="{Binding Source={StaticResource vmTestViewViewModel}}"
          Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="116" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock  Margin="5"  Text="نام كاربر"  />
        <TextBlock Grid.Row="1" Margin="5"  Text="اعتبار حساب كاربري تا"  />

        <TextBox Grid.Column="1" 
                 Margin="5" Text="{Binding User.Name, Mode=TwoWay}" />
        <dp:PDatePicker                 
                TextBoxWidth="100"
                SelectedDate="{Binding User.AccountValidTo, Mode=TwoWay}"
                Grid.Column="1" 
                Grid.Row="1" 
                Margin="5"
                VerticalAlignment="Top"
                TextBoxIsReadOnly="False"
                />
    </Grid>
</UserControl>